import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import fire_to from '@dfeidao/atom-web/msg/fire';

// 操作跳转
export default async function a006(fd: IFeidaoAiBrowserComponent, args: { currentTarget: HTMLElement }) {
	const e = args.currentTarget;
	const sort = e.getAttribute('sort');
	const package_no = e.getAttribute('no');
	const client_type = fd.data.node.querySelector<HTMLSelectElement>('[data-feidao-id="client_point_id"]').value;
	// 修改
	if (sort === "upd") {
		fire_to('zj-000004', 'a001', { formid: e.getAttribute('parameter'), client_type });
	}
	// 删除
	if (sort === "del") {
		fire_to('zj-000007', 'a001', { formid: e.getAttribute('parameter') });
	}
	// 功能权限组
	if (sort === "group") {
		fire_to('zj-000002', 'a001', { formid: e.getAttribute('parameter'), package_no });
	}
}
